Efficient down-scaling of DCT compressed images

ABSTRACT

In a method and a device for calculation of the Discrete Cosine Transform (DCT) only the DCT coefficients representing the first half and the second half of an original sequence are required for obtaining the DCT for the entire original sequence. The device and the method are therefore very useful when calculations of DCTs of a certain length is supported by hardware and/or software, and when DCTs of other sizes are desired. Areas of application are for example still image and video transcoding, as well as scalable image and/or video coding and decoding.

This application is the continuation application of the PCT/US99/01049filed 14 Jun. 1999 which designates the U.S. PCT/US99/01049 claimspriority to SE Application No. 9802286-6 filed 26 Jun. 1998. The entirecontents of these applications are incorporated herein by reference.

TECHNICAL FIELD

The present invention relates to a method and a device for scaling DCTcompressed images.

BACKGROUND OF THE INVENTION AND PRIOR ART

The emergence of the compression standards JPEG, MPEG, H.26x has enabledmany consumer and business multimedia applications, where the multimediacontent is disseminated in its compressed form. However, manyapplications require processing of the multimedia content prior topresentation. A very frequent process is that of down-sampling(down-scaling, down-sizing) the compressed image.

Thus, in applications, such as image and video browsing, it may besufficient to deliver a lower resolution image or video to the user.Based on user's input, the media server could then provide the higherresolution image or video sequence.

Also, composting several MPEG video sources into a single displayedstream is important for MPEG video applications as for example advancedmultimedia terminals, interactive network video and multi-point videoconferencing. Composting video directly in the compressed domain reducescomputational complexity by processing less data and avoiding theconversion process back and forth between the compressed and theuncompressed data formats. In compression standards (MPEG, H.26x),compression is computationally 3 to 4 times more expensive thandecompression. Compressed domain based down-sampling can be used toimplement an efficient picture-in-picture system for MPEG compressedvideo and can result in significant savings.

Furthermore, efficient transcoding should be able to cope with differentquality of services in the case of multi-point communications over POTS,ISDN, and ADSL lines. A HDTV down conversion decoder can decode theGrand Alliance HDTV bitstreams and display them on SDTV or NTSCmonitors.

Conventional techniques for down-scaling rely on decompressing thebitstreams first and then applying the desired processing function(re-compression).

The down-sampling of a still image in the spatial domain consists of twosteps. First the image is filtered by an anti-aliasing low pass filterand then it is sub-sampled by a desired factor in each dimension. For aDCT-compressed image, the above method implies that the compressed andquantised image has to be recovered first into the spatial domain byinverse DCT (IDCT or DCT⁻¹) and then undergo the procedure of filteringand down-sampling as illustrated in FIG. 1 a.

A direct approach would be to work in the compressed domain, where bothoperations of filtering and down-sampling are combined in the DCTdomain. This could be done by cutting off DCT coefficients of highfrequencies and using the IDCT with a smaller number of coefficients toreconstruct the reduced resolution image. For example, one could use the4×4 coefficients out of the 8×8 and perform the IDCT on thesecoefficients in order to reduce the resolution by a factor of 2 in eachdimension as illustrated in FIG. 1 b. This technique does not result insignificant compression gains and requires encoders and decoders to beable to handle 4×4 DCTs and IDCTS. It also requires run-length codingschemes to be optimised for the 4×4 case. Furthermore, this methodresults in significant amount of blocking effects and distortions, dueto the poor approximations introduced by simply discarding higher ordercoefficients.

This technique would be more useful if 16×16 DCT blocks was used andwere 8×8 DCT coefficients were kept in order to obtain the down-sampled.However, most image and video compression standards, like JPEG, H.26x,and MPEG, segment the images into rectangular blocks of size 8×8 pixelsand apply the DCT on these blocks. Therefore, only 8×8 DCTs areavailable. One way to compute the 16×16 DCT coefficients is to applyinverse DCT in each of the 8×8 blocks and reconstruct the image.

Then the DCT in blocks of size 16×16 could be applied and the 8×8 out ofthe 16×16 DCTs coefficients of each block could be kept. This would leadto a complete decoding (performing 8×8 IDCTS) and re-transforming by16×16 DCTs, something that would require 16×16 DCT hardware or software.

However, if one could compute the 8×8 out of the 16×16 DCT coefficientsby using only 8×8 transformations, then this method would be faster andit would perform better than the one that uses the 4×4 out of the 8×8.This would also mean that by avoiding the computation of DCTs of size16×16, the memory requirements could also be reduced as illustrated inFIG. 1 c.

Furthermore, in the international patent application PCT/SE98/00448 amethod and a device for encoding/decoding DCT compressed images in thefrequency domain are described, and which application is hereby isenclosed herein by reference.

SUMMARY

It is an object of the present invention to provide a more efficientencoding/decoding/transcoding algorithm for obtaining the DCTcoefficients of a block from DCT coefficients of the four adjacentblocks than the algorithms described in the above internationalapplication PCT/SE98/00448.

This object is obtained by a device and a method as set out in theappended claims.

Thus, by using the coding/decoding algorithm as described herein a veryefficient computation of an N×N point DCT given the N/2×N/2 DCTcoefficients for four adjacent blocks is achieved. All the operationsare performed in the transform domain, so called transform domainmanipulation (TDM).

BRIEF DESCRIPTION OF THE DRAWINGS

The present invention will now be described in more detail and withreference to the accompanying drawings, in which:

FIGS. 1 a-1 c illustrates different techniques of down scaling an imageaccording to the prior art.

FIG. 2 illustrates the operation of combining four adjacent DCT blocks.

FIGS. 3 a and 3 b show flow graphs for the calculation of an N pointDCT, by the two adjacent N/2 DCTs.

FIG. 4 is a block diagram illustrating a matrix multiplication.

FIGS. 5 a and 5 b illustrates the down sizing of four adjacent DCTblocks.

DETAILED DESCRIPTION

In order to simplify the notation and discussion the 1-D down-samplinganalysis is presented. Because the DCT is separable, all results extendto the 2-D case by simply applying the properties in each of the twodimensions consecutively.

Assume that the DCT coefficients Y_(k) and Z_(k), (k=0, 1, . . . ,(N/2)−1), of two consecutive data sequences y_(n) and z_(n), (n=0, 1, .. . , (N/2)−1), are given, where N=2^(m). The problem to be addressed isthe efficient computation of X_(k), (k=0, 1, . . . , N−1) directly inthe DCT domain, given Y_(k) and Z_(k), where X_(k) are the DCTcoefficients of x_(n), (n=0, 1, . . . , N−1), the sequence generated bythe concatenation of y_(n) and z_(n). The normalised forward DCT(DCT-II) and inverse DCT (IDCT) of the length-N sequence x_(n) are givenby the following equations:${X_{k} = {\sqrt{\frac{2}{N}}ɛ_{k}{\sum\limits_{n = 0}^{N - 1}{x_{n}\cos\quad\frac{\left( {{2n} + 1} \right)\kappa\quad\pi}{2N}}}}},{k = 0},1,\ldots\quad,{N - {1\quad{and}}}$${x_{n} = {\sqrt{\frac{2}{N}}{\sum\limits_{k = 0}^{N - 1}{ɛ_{k}X_{k}\cos\quad\frac{\left( {{2n} + 1} \right){\kappa\pi}}{2N}}}}},{n = 0},1,\ldots\quad,{N - 1}$where ε_(k)=1/√{square root over (2)} for k=0 and ε_(k)=1 for k≠0.Notice that ε_(2k)=ε_(k) and ε_(2k+1)=1.

The normalised DCT and IDCT for the length—(N/2) sequences y_(n) andz_(n) are given by similar expressions, where in this case N issubstituted by N/2.

The computation is performed separately for the even- and theodd-indexed coefficients.i. Even-Indexed Coefficients $\quad\begin{matrix}{X_{2k} = {\sqrt{\frac{2}{N}}ɛ_{2k}{\sum\limits_{n = 0}^{N - 1}{x_{n}\cos\quad\frac{\left( {{2n} + 1} \right)2{\kappa\pi}}{2N}}}}} \\{= {\sqrt{\frac{2}{N}}ɛ_{k}\left\{ {{\sum\limits_{n = 0}^{\frac{N}{2} - 1}{x_{n}\cos\quad\frac{\left( {{2n} + 1} \right){\kappa\pi}}{2\left( {N/2} \right)}}} +} \right.}} \\{\left. {\sum\limits_{n = {N/2}}^{N - 1}{x_{n}\cos\quad\frac{\left( {{2n} + 1} \right){\kappa\pi}}{2\left( {N/2} \right)}}} \right\}} \\{= {\sqrt{\frac{2}{N}}ɛ_{k}\left\{ {{\sum\limits_{n = 0}^{\frac{N}{2} - 1}{y_{n}\cos\quad\frac{\left( {{2n} + 1} \right){\kappa\pi}}{2\left( {N/2} \right)}}} +} \right.}} \\\left. {\sum\limits_{n = 0}^{\frac{N}{2} - 1}{x_{N - 1 - n}{\cos\quad\left\lbrack \frac{{\left\lbrack {{2\left( {N - 1 - n} \right)} + \quad 1} \right\rbrack{\kappa\pi}}\quad}{2\left( {N/2} \right)} \right\rbrack}}} \right\} \\{= {\sqrt{\frac{1}{2}}\left\{ {{\sqrt{\frac{2}{N/2}}ɛ_{k}{\sum\limits_{n = 0}^{\frac{N}{2} - 1}{y_{n}\cos\quad\frac{\left( {{2n} + 1} \right){\kappa\pi}}{2\left( {N/2} \right)}}}} +} \right.}} \\{\left. {\sqrt{\frac{2}{N/2}}ɛ_{k}{\sum\limits_{n = 0}^{\frac{N}{2} - 1}{z_{n}\cos\quad\frac{\left( {{2n} + 1} \right){\kappa\pi}}{2\left( {N/2} \right)}}}} \right\}} \\{{= {{\sqrt{\frac{1}{2}}\left\lbrack {Y_{k} + {\left( {- 1} \right)^{k}Z_{k}}} \right\rbrack} = {{{\sqrt{\frac{1}{2}}\left\lbrack {Y_{k} + Z_{k}^{\prime}} \right\rbrack}\quad k} = 0}}},1,\ldots\quad,{\left( {N/2} \right) - 1.}} \\{{{{where}\quad Z_{k}^{\prime}\quad{is}\quad{the}\quad{DCT}\quad{of}\quad z_{n}^{\prime}} = x_{N - 1 - n}},{n = 0},1,\ldots\quad,{\left( {N/2} \right) - 1.}}\end{matrix}$ii. Odd-Indexed Coefficients $\begin{matrix}{{X_{{2k} + 1} + X_{{2k} - 1}} = {\sqrt{\frac{2}{N}}\left\{ {{\sum\limits_{n = 0}^{N - 1}{x_{n\quad}\cos\quad\frac{\left( {{2n} + 1} \right)\quad\left( {{2k} + 1} \right)\pi}{2N}}} +} \right.}} \\{\left. {\sum\limits_{n = 0}^{N - 1}{x_{n}\cos\quad\frac{\left( {{2n} + 1} \right)\quad\left( {{2k} - 1} \right)\pi}{2N}}} \right\}} \\{= {\frac{1}{ɛ_{k}}\sqrt{\frac{1}{2}}\left\{ {\sqrt{\frac{2}{N/2}}ɛ_{k}{\sum\limits_{n = 0}^{\frac{N}{2} - 1}\left( {y_{n} - z_{n}^{\prime}} \right)}} \right.}} \\{{\left. {2\quad\cos\quad\frac{\left( {{2n} + 1} \right)\pi}{2N}\cos\quad\frac{\left( {{2n} + 1} \right)k\quad\pi}{2\left( {N/2} \right)}} \right\}}\quad{or}}\end{matrix}$${X_{{2k} + 1} = {{\frac{1}{ɛ}\sqrt{\frac{1}{2}}\left\{ {\sqrt{\frac{2}{N/2}}ɛ_{k}{\sum\limits_{l = 0}^{\frac{N}{2} - 1}{r_{n}\cos\quad\frac{\left( {{2n} + 1} \right)k\quad\pi}{2\left( {N/2} \right)}}}} \right\}} - X_{{2k} - 1}}},{{{where}\quad k} = 0},1,\ldots\quad,{\left( {N/2} \right) - {1\quad{and}}}$$\begin{matrix}{r_{n} = {\left( {y_{n} - z_{n}^{\prime}} \right)2\quad\cos\quad\frac{\left( {{2n} + 1} \right)\pi}{2N}}} \\{= {\left\{ {\sqrt{\frac{2}{N/2}}{\sum\limits_{l = 0}^{\frac{N}{2} - 1}{{ɛ_{l}\left( {Y_{l} - Z_{l}^{\prime}} \right)}\cos\quad\frac{\left( {{2n} + 1} \right)l\quad\pi}{2\left( {N/2} \right)}}}} \right\} 2\cos\quad\frac{\left( {{2n} + 1} \right)\pi}{2N}}}\end{matrix}$r_(n) is a length-(N/2) DCT of the length-(N/2) IDCT of (Y₁−Z₁′)multiplied by 2cos(2 n+1)π/2N. The flow graph of the proposed algorithmfor the case of the concatenation of two 8-point adjacent coefficientsequences (i.e. N=16), is depicted in FIG. 3 a. Down-sampling by afactor of 2 implies that only coefficients 0, 2, 4, 6, 1, 3, 5, 7 haveto be calculated.

The calculation of the odd-indexed coefficients could be furthersimplified if the processes of DCT⁻¹, DCT and the multiplications weresubstituted by a matrix multiplication as shown in FIG. 3 b. A blockdiagram of the steps needed for these calculations is illustrated inFIG. 4.

In the special case of N=16 that is under consideration, we have:

G=Y₁−Z₁′ is a column vector of length 8 each element of which equals tothe difference of the corresponding input DCT coefficients.

g=C⁻¹·G is a column vector of length 8 corresponding to the IDCT of G,where C⁻¹=C^(T) (C given below).

r=E·g is a column vector of length 8 each element of which is theproduct of g by 2cos(2n+1) π/2N, where n=0, 1, . . . , 7 and N=16. E isa diagonal matrix and is given by E=2 diag{cos(π/32), cos(3π/32),cos(5π/32), cos(7π/32), cos(9π/32), cos(11π/32), cos(13π/32),cos(15π/32)}.

R=C·r is a column vector of length 8 corresponding to the DCT of r,where $C = {\sqrt{\frac{2}{N/2}}\begin{bmatrix}\sqrt{1/2} & \sqrt{1/2} & \sqrt{1/2} & \sqrt{1/2} & \sqrt{1/2} & \sqrt{1/2} & \sqrt{1/2} & \sqrt{1/2} \\{\cos\quad(\theta)} & {\cos\quad\left( {3\quad\theta} \right)} & {\cos\left( {5\theta} \right)} & {\cos\quad\left( {7\theta} \right)} & {\cos\quad\left( {9\theta} \right)} & {\cos\left( {11\theta} \right)} & {\cos\left( {13\theta} \right)} & {\cos\left( {15\theta} \right)} \\{\cos\quad\left( {2\theta} \right)} & {\cos\left( {6\theta} \right)} & {\cos\left( {10\theta} \right)} & {\cos\left( {14\theta} \right)} & {\cos\quad\left( {18\theta} \right)} & {\cos\quad\left( {22\theta} \right)} & {\cos\left( {26\theta} \right)} & {\cos\quad\left( {30\theta} \right)} \\{\cos\quad\left( {3\theta} \right)} & {\cos\left( {9\theta} \right)} & {\cos\left( {15\theta} \right)} & {\cos\quad\left( {21\theta} \right)} & {\cos\quad\left( {27\theta} \right)} & {\cos\left( {33\theta} \right)} & {\cos\left( {39\theta} \right)} & {\cos\quad\left( {45\theta} \right)} \\{\cos\quad\left( {4\theta} \right)} & {\cos\left( {12\theta} \right)} & {\cos\left( {20\theta} \right)} & {\cos\left( {28\theta} \right)} & {\cos\left( {36\theta} \right)} & {\cos\left( {44\theta} \right)} & {\cos\left( {52\theta} \right)} & {\cos\left( {60\theta} \right)} \\{\cos\left( {5\theta} \right)} & {\cos\left( {15\theta} \right)} & {\cos\left( {25\theta} \right)} & {\cos\left( {35\theta} \right)} & {\cos\left( {45\theta} \right)} & {\cos\quad\left( {55\theta} \right)} & {\cos\left( {65\theta} \right)} & {\cos\left( {75\theta} \right)} \\{\cos\left( {6\theta} \right)} & {\cos\left( {18\theta} \right)} & {\cos\left( {30\theta} \right)} & {\cos\left( {42\theta} \right)} & {\cos\left( {54\theta} \right)} & {\cos\left( {66\theta} \right)} & {\cos\left( {78\theta} \right)} & {\cos\left( {90\theta} \right)} \\{\cos\left( {7\theta} \right)} & {\cos\left( {21\theta} \right)} & {\cos\left( {35\theta} \right)} & {\cos\left( {49\theta} \right)} & {\cos\left( {63\theta} \right)} & {\cos\left( {77\theta} \right)} & {\cos\left( {91\theta} \right)} & {\cos\left( {105\theta} \right)}\end{bmatrix}}$ and  θ = π/N, N = 16.R=P·R is a column vector of length 8 each element of which is theproduct of R by √{square root over (1/2)}, except for the first elementthat is multiplied by ½, i.e. matrix P equals to: P=diag{½, √{squareroot over (1/2)}, √{square root over (1/2)}, √{square root over (1/2)},√{square root over (1/2)}, √{square root over (1/2)}, √{square root over(1/2)}, √{square root over (1/2)}}.

Taking into account all the above given equations, R is expressed asfollows:

R=P·(C·(E·(C⁻¹·G)))=P·C·E·C⁻¹·G or R=T·G where T=P·C·E·C⁻¹. Note thatmatrix C·E·C⁻¹ is symmetric.

The multiplication of these 8×8 matrices results to $T = \begin{bmatrix}0.6376 & 0.2986 & {- 0.0585} & 0.0241 & {- 0.0125} & 0.0071 & {- 0.0039} & 0.0018 \\0.4223 & 0.8433 & 0.3227 & {- 0.0710} & 0.0311 & {- 0.0164} & 0.0088 & {- 0.0039} \\{- 0.0827} & 0.3227 & 0.8893 & 0.3057 & {- 0.0624} & 0.0259 & {- 0.0125} & 0.0053 \\0.0341 & {- 0.0710} & 0.3057 & 0.8978 & 0.3004 & {- 0.0585} & 0.0223 & {- 0.0086} \\{- 0.0177} & 0.0311 & {- 0.0624} & 0.3004 & 0.9018 & 0.2969 & {- 0.0546} & 0.0170 \\0.0100 & {- 0.0164} & 0.0259 & {- 0.0585} & 0.2969 & 0.9057 & 0.2916 & {- 0.0460} \\{- 0.0056} & 0.0088 & {- 0.0125} & 0.0223 & {- 0.0546} & 0.2916 & 0.9143 & 0.2745 \\0.0025 & {- 0.0039} & 0.0053 & {- 0.0086} & 0.0170 & {- 0.0460} & 0.2745 & 0.9603\end{bmatrix}$as is shown below.

Thus, in the general case of down-scaling two concatenated N/2 DCTcoefficient sequences into one N/2 coefficient sequence:

T=P·C·E·C⁻¹

where

P=diag {½,√{square root over (1/2)}, √{square root over (1/2)}, . . . }$E = {2{diag}\quad\left\{ {\cos\quad\frac{\left( {{2n} + 1} \right)\pi}{2N}} \right\}}$${C = {\sqrt{\frac{2}{N/2}}\left\{ {ɛ_{k}\cos\quad\frac{\left( {{2n} + 1} \right)k\quad\pi}{N}} \right\}}},n,{k = 0},1,\ldots\quad,{\left( {N/2} \right) - 1}$All  matrices  are  of  size  N/2 × N/2.

All matrices are of size N/2×N/2.

In the special case of N=16 the above given matrices become:

-   a=√{square root over (1/2)}, 0=π/N $P = \begin{bmatrix}    {.5} & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\    0 & a & 0 & 0 & 0 & 0 & 0 & 0 \\    0 & 0 & a & 0 & 0 & 0 & 0 & 0 \\    0 & 0 & 0 & a & 0 & 0 & 0 & 0 \\    0 & 0 & 0 & 0 & a & 0 & 0 & 0 \\    0 & 0 & 0 & 0 & 0 & a & 0 & 0 \\    0 & 0 & 0 & 0 & 0 & 0 & a & 0 \\    0 & 0 & 0 & 0 & 0 & 0 & 0 & a    \end{bmatrix}$ $E = {2\begin{bmatrix}    {\cos\left( {\theta/2} \right)} & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\    0 & {\cos\quad\left( {3\quad{\theta/2}} \right)} & 0 & 0 & 0 & 0 & 0 & 0 \\    0 & 0 & {\cos\left( {5{\theta/2}} \right)} & 0 & 0 & 0 & 0 & 0 \\    0 & 0 & 0 & {\cos\quad\left( {7{\theta/2}} \right)} & 0 & 0 & 0 & 0 \\    0 & 0 & 0 & 0 & {\cos\left( {9{\theta/2}} \right)} & 0 & 0 & 0 \\    0 & 0 & 0 & 0 & 0 & {\cos\quad\left( {\theta/2} \right)} & 0 & 0 \\    0 & 0 & 0 & 0 & 0 & 0 & {\cos\left( {13{\theta/2}} \right)} & 0 \\    0 & 0 & 0 & 0 & 0 & 0 & 0 & {\cos\left( {15{\theta/2}} \right)}    \end{bmatrix}}$ $C = {\sqrt{\frac{2}{N/2}}\begin{bmatrix}    \sqrt{1/2} & \sqrt{1/2} & \sqrt{1/2} & \sqrt{1/2} & \sqrt{1/2} & \sqrt{1/2} & \sqrt{1/2} & \sqrt{1/2} \\    {\cos\quad(\theta)} & {\cos\quad\left( {3\quad\theta} \right)} & {\cos\left( {5\theta} \right)} & {\cos\quad\left( {7\theta} \right)} & {\cos\quad\left( {9\theta} \right)} & {\cos\left( {11\theta} \right)} & {\cos\left( {13\theta} \right)} & {\cos\left( {15\theta} \right)} \\    {\cos\quad\left( {2\theta} \right)} & {\cos\left( {6\theta} \right)} & {\cos\left( {10\theta} \right)} & {\cos\left( {14\theta} \right)} & {\cos\quad\left( {18\theta} \right)} & {\cos\quad\left( {22\theta} \right)} & {\cos\left( {26\theta} \right)} & {\cos\quad\left( {30\theta} \right)} \\    {\cos\quad\left( {3\theta} \right)} & {\cos\left( {9\theta} \right)} & {\cos\left( {15\theta} \right)} & {\cos\quad\left( {21\theta} \right)} & {\cos\quad\left( {27\theta} \right)} & {\cos\left( {33\theta} \right)} & {\cos\left( {39\theta} \right)} & {\cos\quad\left( {45\theta} \right)} \\    {\cos\quad\left( {4\theta} \right)} & {\cos\left( {12\theta} \right)} & {\cos\left( {20\theta} \right)} & {\cos\left( {28\theta} \right)} & {\cos\left( {36\theta} \right)} & {\cos\left( {44\theta} \right)} & {\cos\left( {52\theta} \right)} & {\cos\left( {60\theta} \right)} \\    {\cos\left( {5\theta} \right)} & {\cos\left( {15\theta} \right)} & {\cos\left( {25\theta} \right)} & {\cos\left( {35\theta} \right)} & {\cos\left( {45\theta} \right)} & {\cos\quad\left( {55\theta} \right)} & {\cos\left( {65\theta} \right)} & {\cos\left( {75\theta} \right)} \\    {\cos\left( {6\theta} \right)} & {\cos\left( {18\theta} \right)} & {\cos\left( {30\theta} \right)} & {\cos\left( {42\theta} \right)} & {\cos\left( {54\theta} \right)} & {\cos\left( {66\theta} \right)} & {\cos\left( {78\theta} \right)} & {\cos\left( {90\theta} \right)} \\    {\cos\left( {7\theta} \right)} & {\cos\left( {21\theta} \right)} & {\cos\left( {35\theta} \right)} & {\cos\left( {49\theta} \right)} & {\cos\left( {63\theta} \right)} & {\cos\left( {77\theta} \right)} & {\cos\left( {91\theta} \right)} & {\cos\left( {105\theta} \right)}    \end{bmatrix}}$ and  finally $T = \begin{bmatrix}    0.6376 & 0.2986 & {- 0.0585} & 0.0241 & {- 0.0125} & 0.0071 & {- 0.0039} & 0.0018 \\    0.4223 & 0.8433 & 0.3227 & {- 0.0710} & 0.0311 & {- 0.0164} & 0.0088 & {- 0.0039} \\    {- 0.0827} & 0.3227 & 0.8893 & 0.3057 & {- 0.0624} & 0.0259 & {- 0.0125} & 0.0053 \\    0.0341 & {- 0.0710} & 0.3057 & 0.8978 & 0.3004 & {- 0.0585} & 0.0223 & {- 0.0086} \\    {- 0.0177} & 0.0311 & {- 0.0624} & 0.3004 & 0.9018 & 0.2969 & {- 0.0546} & 0.0170 \\    0.0100 & {- 0.0164} & 0.0259 & {- 0.0585} & 0.2969 & 0.9057 & 0.2916 & {- 0.0460} \\    {- 0.0056} & 0.0088 & {- 0.0125} & 0.0223 & {- 0.0546} & 0.2916 & 0.9143 & 0.2745 \\    0.0025 & {- 0.0039} & 0.0053 & {- 0.0086} & 0.0170 & {- 0.0460} & 0.2745 & 0.9603    \end{bmatrix}$

Notice that further improvements can be done, as for example useapproximated values for the T matrix or the T matrix can be computedwithout the √{square root over (1/2)} terms of the P matrix. Those termscan be included after the T matrix is computed.

The computational complexity for computing of N/2 out of N points, i.e.downscaling by a factor of 2, is O_(M)=N(N+2)/8 and O_(A)=(N(N+6)−1)/8.For the computation of 8 out of 16 coefficients (i.e. N=16) 36multiplications and 43 additions are required. More specifically thecomputation of the even indexed coefficients requires 4 multiplicationsby √{square root over (1/2)} and 4 additions. The computation ofG=Y₁−Z₁′ requires 8 subtractions and the computation of R requires 32multiplications and 28 additions (only the upper 4×8 elements of the Tmatrix are used, since only coefficients X_(i), i=1, 3, 5, 7 have to becalculated). 3 post additions are needed for calculating the requiredodd-indexed coefficients from R.

Special Cases

a. When only the first 4 out of the 8 coefficients Y_(k), Z_(k)′ arenon-zero (i.e. Y_(k)=Z_(k)′=0 for k=4, 5, 6, 7), then the above givencomplexity becomes 20 multiplications and 23 additions. Specifically thecomputation of the even indexed coefficients requires 4 multiplicationsby √{square root over (1/2)} and 4 additions, the computation ofG=Y₁−Z₁′ requires 4 subtractions and the computation of R requires 16multiplications and 12 additions (since only the upper 4×4 elements ofthe T matrix are used). 3 post additions are needed for calculating therequired odd-indexed coefficients from R.

b. In all cases the 4 multiplications by √{square root over (1/2)} forthe computation of the even indexed coefficients could be saved byabsorbing them into the quantisation stage that follows the TDM stage.

c. A number of operations could also be saved if the values of the Tmatrix were rounded to the closest power of 2. In such a case shiftscould be used instead of multiplications. The exploitation of the shiftand add operation existing in all modern DSPs and general purpose CPUswould also increase performance considerably.

In the case of down-scaling 4 adjacent 8×8 DCT blocks down to one 8×8block, i.e. down-sizing by a factor of 2 in each dimension, by means ofthe row-column method, the proposed algorithm has to be applied 24times. I.e. 16 times across the rows and 8 times across the columns asshown in FIG. 5 a. This gives a computational complexity of 864multiplications and 1032 additions or a total of 1896 operations(additions plus multiplications).

In the special case that only the upper left 4×4 DCT coefficients ofeach 8×8 block are non-zero, the algorithm has to be applied 16 timesonly, i.e. 8 times across each dimension, as shown in FIG. 5 b. Thisresults to a complexity of 320 multiplications and 368 additions or atotal of 688 operations.

The above given complexity figures could be further reduced ifapproximate values, e.g. powers of 2, for the T matrix elements wereused.

Considering that 11 multiplications and 29 additions are needed for eachDCT or IDCT computation, a total of 1008 multiplications and 1752additions or 2760 operations are required for down-scaling four adjacent8×8 DCT blocks down to one 8×8 block according to the approach depictedin FIG. 3 a. The comparison of this complexity to that needed for thecase of FIG. 5 a, 1896 operations are needed (or 31.3% are saved). Inthe special case of FIG. 5 b, the computational savings are about 64%.

Down-sampling of compressed images in the transform domain is not onlyadvantageous from the computational point of view, but from the obtainedpicture quality as well. This is due to the fact that a great number ofarithmetic and quantisation errors are avoided. The values of the Tmatrix can be off-line calculated to the desired accuracy and the sum ofproducts for the computation of TG can also be calculated to the desiredaccuracy. No intermediate calculation steps of lower accuracy areneeded.

The method can also be used for downscaling of video sequences instandards like H.261/263, MPEG 1/2/4. The application of the method isscalable video coding, as in frequency scalability schemes is alsopossible, as described in PCT/SE98/00448.

Also, in transcoder applications, a transcoder can be arranged todownscale the compressed images. For example, in video transcoding themethod as described herein can be used for intra and inter macroblocksin video coding standards. In that case the motion vectors are scaledaccordingly.

Thus, by using the algorithm as described herein encoding and decodingwhen processing digital images in the compressed domain many advantagesin terms of processing speed, storage efficiency and image quality areobtained.

1. An encoder having means for calculating the DCT of a sequence oflength N/2, N being a positive, even integer, and having means forcalculating a DCT of length N directly from two sequences of length N/2representing the first and second half of an original sequence of lengthN, characterised in that the means for calculating DCTs of length N/2are arranged to calculate the even coefficients of a DCT of length N as:$\begin{matrix}{X_{2k} = {\sqrt{\frac{2}{N}}ɛ_{2k}{\sum\limits_{n = 0}^{N - 1}{x_{n}\cos\quad\frac{\left( {{2n} + 1} \right)2{\kappa\pi}}{2N}}}}} \\{= {\sqrt{\frac{2}{N}}ɛ_{k}\left\{ {{\sum\limits_{n = 0}^{\frac{N}{2} - 1}{x_{n}\cos\quad\frac{\left( {{2n} + 1} \right){\kappa\pi}}{2\left( {N/2} \right)}}} + {\sum\limits_{n = {N/2}}^{N - 1}{x_{n}\cos\quad\frac{\left( {{2n} + 1} \right){\kappa\pi}}{2\left( {N/2} \right)}}}} \right\}}} \\{= {\sqrt{\frac{2}{N}}ɛ_{k}\left\{ {{\sum\limits_{n = 0}^{\frac{N}{2} - 1}{y_{n}\cos\quad\frac{\left( {{2n} + 1} \right){\kappa\pi}}{2\left( {N/2} \right)}}} +} \right.}} \\\left. {\sum\limits_{n = 0}^{\frac{N}{2} - 1}{x_{N - 1 - n}{\cos\quad\left\lbrack \frac{{\left\lbrack {{2\left( {N - 1 - n} \right)} + \quad 1} \right\rbrack{\kappa\pi}}\quad}{2\left( {N/2} \right)} \right\rbrack}}} \right\} \\{= {\sqrt{\frac{1}{2}}\left\{ {{\sqrt{\frac{2}{N/2}}ɛ_{k}{\sum\limits_{n = 0}^{\frac{N}{2} - 1}{y_{n}\cos\quad\frac{\left( {{2n} + 1} \right){\kappa\pi}}{2\left( {N/2} \right)}}}} +} \right.}} \\{\left. {\sqrt{\frac{2}{N/2}}ɛ_{k}{\sum\limits_{n = 0}^{\frac{N}{2} - 1}{z_{n}\cos\quad\frac{\left( {{2n} + 1} \right){\kappa\pi}}{2\left( {N/2} \right)}}}} \right\}} \\{{= {{\sqrt{\frac{1}{2}}\left\lbrack {Y_{k} + {\left( {- 1} \right)^{k}Z_{k}}} \right\rbrack} = {{{\sqrt{\frac{1}{2}}\left\lbrack {Y_{k} + Z_{k}^{\prime}} \right\rbrack}\quad k} = 0}}},1,\ldots\quad,{\left( {N/2} \right) - 1.}} \\{{{{where}\quad Z_{k}^{\prime}\quad{is}\quad{the}\quad{DCT}\quad{of}\quad z_{n}^{\prime}} = x_{N - 1 - n}},{n = 0},1,\ldots\quad,{\left( {N/2} \right) - 1.}}\end{matrix}$ And the odd index coefficients as $\begin{matrix}{{X_{{2k} + 1} + X_{{2k} - 1}}=={\sqrt{\frac{2}{N}}\left\{ {{\sum\limits_{n = 0}^{N - 1}{x_{n\quad}\cos\quad\frac{\left( {{2n} + 1} \right)\quad\left( {{2k} + 1} \right)\pi}{2N}}} +} \right.}} \\{\left. {\sum\limits_{n = 0}^{N - 1}{x_{n}\cos\quad\frac{\left( {{2n} + 1} \right)\quad\left( {{2k} - 1} \right)\pi}{2N}}} \right\}} \\{= {\frac{1}{ɛ_{k}}\sqrt{\frac{1}{2}}\left\{ {\sqrt{\frac{2}{N/2}}ɛ_{k}{\sum\limits_{n = 0}^{\frac{N}{2} - 1}\left( {y_{n} - z_{n}^{\prime}} \right)}} \right.}} \\{{\left. {2\quad\cos\quad\frac{\left( {{2n} + 1} \right)\pi}{2N}\cos\quad\frac{\left( {{2n} + 1} \right)k\quad\pi}{2\left( {N/2} \right)}} \right\}}\quad{or}}\end{matrix}\quad$${X_{{2k} + 1} = {{\frac{1}{ɛ_{k}}\sqrt{\frac{1}{2}}\left\{ {\sqrt{\frac{2}{N/2}}ɛ_{k}{\sum\limits_{n = 0}^{\frac{N}{2} - 1}{r_{n}\cos\quad\frac{\left( {{2n} + 1} \right)k\quad\pi}{2\left( {N/2} \right)}}}} \right\}} - X_{{2k} - 1}}},{{{where}\quad k} = 0},1,\ldots\quad,{\left( {N/2} \right) - {1\quad{and}}}$$\begin{matrix}{r_{n} = {\left( {y_{n} - z_{n}^{\prime}} \right)2\quad\cos\quad\frac{\left( {{2n} + 1} \right)\pi}{2N}}} \\{= {\left\{ {\sqrt{\frac{2}{N/2}}{\sum\limits_{l = 0}^{\frac{N}{2} - 1}{{ɛ_{l}\left( {Y_{l} - Z_{l}^{\prime}} \right)}\cos\quad\frac{\left( {{2n} + 1} \right)l\quad\pi}{2\left( {N/2} \right)}}}} \right\} 2\cos\quad{\frac{\left( {{2n} + 1} \right)\pi}{2N}.}}}\end{matrix}$
 2. An encoder having means for calculating the DCT of asequence of length N/2×N/2, N being a positive, even integer havingmeans for calculating an N×N DCT directly from four DCTs of length(N/2×N/2) representing the DCTs of four adjacent blocks constituting theN×N block, characterised in that the means for calculating DCTs oflength N/2 are arranged to calculate the even coefficients of a DCT oflength N as: $\begin{matrix}{X_{2k} = {\sqrt{\frac{2}{N}}ɛ_{2k}{\sum\limits_{n = 0}^{N - 1}{x_{n}\cos\quad\frac{\left( {{2n} + 1} \right)2{\kappa\pi}}{2N}}}}} \\{= {\sqrt{\frac{2}{N}}ɛ_{k}\left\{ {{\sum\limits_{n = 0}^{\frac{N}{2} - 1}{x_{n}\cos\quad\frac{\left( {{2n} + 1} \right){\kappa\pi}}{2\left( {N/2} \right)}}} + {\sum\limits_{n = {N/2}}^{N - 1}{x_{n}\cos\quad\frac{\left( {{2n} + 1} \right){\kappa\pi}}{2\left( {N/2} \right)}}}} \right\}}} \\{= {\sqrt{\frac{2}{N}}ɛ_{k}\left\{ {{\sum\limits_{n = 0}^{\frac{N}{2} - 1}{y_{n}\cos\quad\frac{\left( {{2n} + 1} \right){\kappa\pi}}{2\left( {N/2} \right)}}} +} \right.}} \\\left. {\sum\limits_{n = 0}^{\frac{N}{2} - 1}{x_{N - 1 - n}{\cos\quad\left\lbrack \frac{{\left\lbrack {{2\left( {N - 1 - n} \right)} + \quad 1} \right\rbrack{\kappa\pi}}\quad}{2\left( {N/2} \right)} \right\rbrack}}} \right\} \\{= {\sqrt{\frac{1}{2}}\left\{ {{\sqrt{\frac{2}{N/2}}ɛ_{k}{\sum\limits_{n = 0}^{\frac{N}{2} - 1}{y_{n}\cos\quad\frac{\left( {{2n} + 1} \right){\kappa\pi}}{2\left( {N/2} \right)}}}} +} \right.}} \\{\left. {\sqrt{\frac{2}{N/2}}ɛ_{k}{\sum\limits_{n = 0}^{\frac{N}{2} - 1}{z_{n}\cos\quad\frac{\left( {{2n} + 1} \right){\kappa\pi}}{2\left( {N/2} \right)}}}} \right\}} \\{{= {{\sqrt{\frac{1}{2}}\left\lbrack {Y_{k} + {\left( {- 1} \right)^{k}Z_{k}}} \right\rbrack} = {{{\sqrt{\frac{1}{2}}\left\lbrack {Y_{k} + Z_{k}^{\prime}} \right\rbrack}\quad k} = 0}}},1,\ldots\quad,{\left( {N/2} \right) - 1.}} \\{{{{where}\quad Z_{k}^{\prime}\quad{is}\quad{the}\quad{DCT}\quad{of}\quad z_{n}^{\prime}} = x_{N - 1 - n}},{n = 0},1,\ldots\quad,{\left( {N/2} \right) - 1.}}\end{matrix}$ And the odd index coefficients as $\begin{matrix}{{X_{{2k} + 1} + X_{{2k} - 1}}=={\sqrt{\frac{2}{N}}\left\{ {{\sum\limits_{n = 0}^{N - 1}{x_{n\quad}\cos\quad\frac{\left( {{2n} + 1} \right)\quad\left( {{2k} + 1} \right)\pi}{2N}}} +} \right.}} \\{\left. {\sum\limits_{n = 0}^{N - 1}{x_{n}\cos\quad\frac{\left( {{2n} + 1} \right)\quad\left( {{2k} - 1} \right)\pi}{2N}}} \right\}} \\{= {\frac{1}{ɛ_{k}}\sqrt{\frac{1}{2}}\left\{ {\sqrt{\frac{2}{N/2}}ɛ_{k}{\sum\limits_{n = 0}^{\frac{N}{2} - 1}\left( {y_{n} - z_{n}^{\prime}} \right)}} \right.}} \\{{\left. {2\quad\cos\quad\frac{\left( {{2n} + 1} \right)\pi}{2N}\cos\quad\frac{\left( {{2n} + 1} \right)k\quad\pi}{2\left( {N/2} \right)}} \right\}}\quad{or}}\end{matrix}\quad$${X_{{2k} + 1} = {{\frac{1}{ɛ_{k}}\sqrt{\frac{1}{2}}\left\{ {\sqrt{\frac{2}{N/2}}ɛ_{k}{\sum\limits_{n = 0}^{\frac{N}{2} - 1}{r_{n}\cos\quad\frac{\left( {{2n} + 1} \right)k\quad\pi}{2\left( {N/2} \right)}}}} \right\}} - X_{{2k} - 1}}},{{{where}\quad k} = 0},1,\ldots\quad,{\left( {N/2} \right) - {1\quad{and}}}$$\begin{matrix}{r_{n} = {\left( {y_{n} - z_{n}^{\prime}} \right)2\quad\cos\quad\frac{\left( {{2n} + 1} \right)\pi}{2N}}} \\{= {\left\{ {\sqrt{\frac{2}{N/2}}{\sum\limits_{l = 0}^{\frac{N}{2} - 1}{{ɛ_{l}\left( {Y_{l} - Z_{l}^{\prime}} \right)}\cos\quad\frac{\left( {{2n} + 1} \right)l\quad\pi}{2\left( {N/2} \right)}}}} \right\} 2\cos\quad{\frac{\left( {{2n} + 1} \right)\pi}{2N}.}}}\end{matrix}$
 3. An encoder according to claim 1, characterised in thatN is equal to 2^(m), m being a positive integer>0.
 4. A decoder havingmeans for calculating the DCT of a sequence of length N/2, N being apositive, even integer having means for calculating a DCT of length Ndirectly from two sequences of length N/2 representing the first andsecond half of an original sequence of length N, characterised in thatthe means for calculating DCTs of length N/2 are arranged to calculatethe even coefficients of a DCT of length N as: $\begin{matrix}{X_{2k} = {\sqrt{\frac{2}{N}}ɛ_{2k}{\sum\limits_{n = 0}^{N - 1}{x_{n}\cos\quad\frac{\left( {{2n} + 1} \right)2{\kappa\pi}}{2N}}}}} \\{= {\sqrt{\frac{2}{N}}ɛ_{k}\left\{ {{\sum\limits_{n = 0}^{\frac{N}{2} - 1}{x_{n}\cos\quad\frac{\left( {{2n} + 1} \right){\kappa\pi}}{2\left( {N/2} \right)}}} + {\sum\limits_{n = {N/2}}^{N - 1}{x_{n}\cos\quad\frac{\left( {{2n} + 1} \right){\kappa\pi}}{2\left( {N/2} \right)}}}} \right\}}} \\{= {\sqrt{\frac{2}{N}}ɛ_{k}\left\{ {{\sum\limits_{n = 0}^{\frac{N}{2} - 1}{y_{n}\cos\quad\frac{\left( {{2n} + 1} \right){\kappa\pi}}{2\left( {N/2} \right)}}} +} \right.}} \\\left. {\sum\limits_{n = 0}^{\frac{N}{2} - 1}{x_{N - 1 - n}{\cos\quad\left\lbrack \frac{{\left\lbrack {{2\left( {N - 1 - n} \right)} + \quad 1} \right\rbrack{\kappa\pi}}\quad}{2\left( {N/2} \right)} \right\rbrack}}} \right\} \\{= {\sqrt{\frac{1}{2}}\left\{ {{\sqrt{\frac{2}{N/2}}ɛ_{k}{\sum\limits_{n = 0}^{\frac{N}{2} - 1}{y_{n}\cos\quad\frac{\left( {{2n} + 1} \right){\kappa\pi}}{2\left( {N/2} \right)}}}} +} \right.}} \\{\left. {\sqrt{\frac{2}{N/2}}ɛ_{k}{\sum\limits_{n = 0}^{\frac{N}{2} - 1}{z_{n}\cos\quad\frac{\left( {{2n} + 1} \right){\kappa\pi}}{2\left( {N/2} \right)}}}} \right\}} \\{{= {{\sqrt{\frac{1}{2}}\left\lbrack {Y_{k} + {\left( {- 1} \right)^{k}Z_{k}}} \right\rbrack} = {{{\sqrt{\frac{1}{2}}\left\lbrack {Y_{k} + Z_{k}^{\prime}} \right\rbrack}\quad k} = 0}}},1,\ldots\quad,{\left( {N/2} \right) - 1.}} \\{{{{where}\quad Z_{k}^{\prime}\quad{is}\quad{the}\quad{DCT}\quad{of}\quad z_{n}^{\prime}} = x_{N - 1 - n}},{n = 0},1,\ldots\quad,{\left( {N/2} \right) - 1.}}\end{matrix}$ And the odd index coefficients as $\begin{matrix}{{X_{{2k} + 1} + X_{{2k} - 1}}=={\sqrt{\frac{2}{N}}\left\{ {{\sum\limits_{n = 0}^{N - 1}{x_{n\quad}\cos\quad\frac{\left( {{2n} + 1} \right)\quad\left( {{2k} + 1} \right)\pi}{2N}}} +} \right.}} \\{\left. {\sum\limits_{n = 0}^{N - 1}{x_{n}\cos\quad\frac{\left( {{2n} + 1} \right)\quad\left( {{2k} - 1} \right)\pi}{2N}}} \right\}} \\{= {\frac{1}{ɛ_{k}}\sqrt{\frac{1}{2}}\left\{ {\sqrt{\frac{2}{N/2}}ɛ_{k}{\sum\limits_{n = 0}^{\frac{N}{2} - 1}\left( {y_{n} - z_{n}^{\prime}} \right)}} \right.}} \\{{\left. {2\quad\cos\quad\frac{\left( {{2n} + 1} \right)\pi}{2N}\cos\quad\frac{\left( {{2n} + 1} \right)k\quad\pi}{2\left( {N/2} \right)}} \right\}}\quad{or}}\end{matrix}\quad$${X_{{2k} + 1} = {{\frac{1}{ɛ_{k}}\sqrt{\frac{1}{2}}\left\{ {\sqrt{\frac{2}{N/2}}ɛ_{k}{\sum\limits_{n = 0}^{\frac{N}{2} - 1}{r_{n}\cos\quad\frac{\left( {{2n} + 1} \right)k\quad\pi}{2\left( {N/2} \right)}}}} \right\}} - X_{{2k} - 1}}},{{{where}\quad k} = 0},1,\ldots\quad,{\left( {N/2} \right) - {1\quad{and}}}$$\begin{matrix}{r_{n} = {\left( {y_{n} - z_{n}^{\prime}} \right)2\quad\cos\quad\frac{\left( {{2n} + 1} \right)\pi}{2N}}} \\{= {\left\{ {\sqrt{\frac{2}{N/2}}{\sum\limits_{l = 0}^{\frac{N}{2} - 1}{{ɛ_{l}\left( {Y_{l} - Z_{l}^{\prime}} \right)}\cos\quad\frac{\left( {{2n} + 1} \right)l\quad\pi}{2\left( {N/2} \right)}}}} \right\} 2\cos\quad{\frac{\left( {{2n} + 1} \right)\pi}{2N}.}}}\end{matrix}$
 5. A decoder having means for calculating the DCT of asequence of length N/2×N/2, N being a positive, even integer havingmeans for calculating an N×N DCT directly from four DCTs of length(N/2×N/2) representing the DCTs of four adjacent blocks constituting theN×N block, characterised in that the means for calculating DCTs oflength N/2 are arranged to calculate the even coefficients of a DCT oflength N as: $\begin{matrix}{X_{2k} = {\sqrt{\frac{2}{N}}ɛ_{2k}{\sum\limits_{n = 0}^{N - 1}{x_{n}\cos\quad\frac{\left( {{2n} + 1} \right)2{\kappa\pi}}{2N}}}}} \\{= {\sqrt{\frac{2}{N}}ɛ_{k}\left\{ {{\sum\limits_{n = 0}^{\frac{N}{2} - 1}{x_{n}\cos\quad\frac{\left( {{2n} + 1} \right){\kappa\pi}}{2\left( {N/2} \right)}}} + {\sum\limits_{n = {N/2}}^{N - 1}{x_{n}\cos\quad\frac{\left( {{2n} + 1} \right){\kappa\pi}}{2\left( {N/2} \right)}}}} \right\}}} \\{= {\sqrt{\frac{2}{N}}ɛ_{k}\left\{ {{\sum\limits_{n = 0}^{\frac{N}{2} - 1}{y_{n}\cos\quad\frac{\left( {{2n} + 1} \right){\kappa\pi}}{2\left( {N/2} \right)}}} +} \right.}} \\\left. {\sum\limits_{n = 0}^{\frac{N}{2} - 1}{x_{N - 1 - n}{\cos\quad\left\lbrack \frac{{\left\lbrack {{2\left( {N - 1 - n} \right)} + \quad 1} \right\rbrack{\kappa\pi}}\quad}{2\left( {N/2} \right)} \right\rbrack}}} \right\} \\{= {\sqrt{\frac{1}{2}}\left\{ {{\sqrt{\frac{2}{N/2}}ɛ_{k}{\sum\limits_{n = 0}^{\frac{N}{2} - 1}{y_{n}\cos\quad\frac{\left( {{2n} + 1} \right){\kappa\pi}}{2\left( {N/2} \right)}}}} +} \right.}} \\{\left. {\sqrt{\frac{2}{N/2}}ɛ_{k}{\sum\limits_{n = 0}^{\frac{N}{2} - 1}{z_{n}\cos\quad\frac{\left( {{2n} + 1} \right){\kappa\pi}}{2\left( {N/2} \right)}}}} \right\}} \\{{= {{\sqrt{\frac{1}{2}}\left\lbrack {Y_{k} + {\left( {- 1} \right)^{k}Z_{k}}} \right\rbrack} = {{{\sqrt{\frac{1}{2}}\left\lbrack {Y_{k} + Z_{k}^{\prime}} \right\rbrack}\quad k} = 0}}},1,\ldots\quad,{\left( {N/2} \right) - 1.}} \\{{{{where}\quad Z_{k}^{\prime}\quad{is}\quad{the}\quad{DCT}\quad{of}\quad z_{n}^{\prime}} = x_{N - 1 - n}},{n = 0},1,\ldots\quad,{\left( {N/2} \right) - 1.}}\end{matrix}$ And the odd index coefficients as $\begin{matrix}{{X_{{2k} + 1} + X_{{2k} - 1}}=={\sqrt{\frac{2}{N}}\left\{ {{\sum\limits_{n = 0}^{N - 1}{x_{n\quad}\cos\quad\frac{\left( {{2n} + 1} \right)\quad\left( {{2k} + 1} \right)\pi}{2N}}} +} \right.}} \\{\left. {\sum\limits_{n = 0}^{N - 1}{x_{n}\cos\quad\frac{\left( {{2n} + 1} \right)\quad\left( {{2k} - 1} \right)\pi}{2N}}} \right\}} \\{= {\frac{1}{ɛ_{k}}\sqrt{\frac{1}{2}}\left\{ {\sqrt{\frac{2}{N/2}}ɛ_{k}{\sum\limits_{n = 0}^{\frac{N}{2} - 1}\left( {y_{n} - z_{n}^{\prime}} \right)}} \right.}} \\{{\left. {2\quad\cos\quad\frac{\left( {{2n} + 1} \right)\pi}{2N}\cos\quad\frac{\left( {{2n} + 1} \right)k\quad\pi}{2\left( {N/2} \right)}} \right\}}\quad{or}}\end{matrix}\quad$${X_{{2k} + 1} = {{\frac{1}{ɛ_{k}}\sqrt{\frac{1}{2}}\left\{ {\sqrt{\frac{2}{N/2}}ɛ_{k}{\sum\limits_{n = 0}^{\frac{N}{2} - 1}{r_{n}\cos\quad\frac{\left( {{2n} + 1} \right)k\quad\pi}{2\left( {N/2} \right)}}}} \right\}} - X_{{2k} - 1}}},{{{where}\quad k} = 0},1,\ldots\quad,{\left( {N/2} \right) - {1\quad{and}}}$$\begin{matrix}{r_{n} = {\left( {y_{n} - z_{n}^{\prime}} \right)2\quad\cos\quad\frac{\left( {{2n} + 1} \right)\pi}{2N}}} \\{= {\left\{ {\sqrt{\frac{2}{N/2}}{\sum\limits_{l = 0}^{\frac{N}{2} - 1}{{ɛ_{l}\left( {Y_{l} - Z_{l}^{\prime}} \right)}\cos\quad\frac{\left( {{2n} + 1} \right)l\quad\pi}{2\left( {N/2} \right)}}}} \right\} 2\cos\quad{\frac{\left( {{2n} + 1} \right)\pi}{2N}.}}}\end{matrix}$
 6. A decoder according to claim 1, characterised in that Nis equal to 2^(m), m being a positive integer>0.
 7. A transcodercomprising an encoder or decoder according to claim
 1. 8. A transcoderaccording to claim 7, characterised in that the transcoder is arrangedto downscale a compressed image.
 9. A system for transmitting DCTtransformed image or video data comprising an encoder or decoderaccording to claim
 1. 10. A method of encoding an image in thecompressed (DCT) domain, using DCTs of lengths N/2 and wherein thecompressed frames are undersampled by a certain factor in eachdimension, wherein an N×N DCT is directly calculated from 4 adjacentN/2×N/2 blocks of DCT coefficients of the incoming compressed frames, Nbeing a positive, even integer, characterised in that the evencoefficients of a DCT of length N are calculated as: $\begin{matrix}{X_{2k} = {\sqrt{\frac{2}{N}}ɛ_{2k}{\sum\limits_{n = 0}^{N - 1}{x_{n}\cos\quad\frac{\left( {{2n} + 1} \right)2{\kappa\pi}}{2N}}}}} \\{= {\sqrt{\frac{2}{N}}ɛ_{k}\left\{ {{\sum\limits_{n = 0}^{\frac{N}{2} - 1}{x_{n}\cos\quad\frac{\left( {{2n} + 1} \right){\kappa\pi}}{2\left( {N/2} \right)}}} + {\sum\limits_{n = {N/2}}^{N - 1}{x_{n}\cos\quad\frac{\left( {{2n} + 1} \right){\kappa\pi}}{2\left( {N/2} \right)}}}} \right\}}} \\{= {\sqrt{\frac{2}{N}}ɛ_{k}\left\{ {{\sum\limits_{n = 0}^{\frac{N}{2} - 1}{y_{n}\cos\quad\frac{\left( {{2n} + 1} \right){\kappa\pi}}{2\left( {N/2} \right)}}} +} \right.}} \\\left. {\sum\limits_{n = 0}^{\frac{N}{2} - 1}{x_{N - 1 - n}{\cos\quad\left\lbrack \frac{{\left\lbrack {{2\left( {N - 1 - n} \right)} + \quad 1} \right\rbrack{\kappa\pi}}\quad}{2\left( {N/2} \right)} \right\rbrack}}} \right\} \\{= {\sqrt{\frac{1}{2}}\left\{ {{\sqrt{\frac{2}{N/2}}ɛ_{k}{\sum\limits_{n = 0}^{\frac{N}{2} - 1}{y_{n}\cos\quad\frac{\left( {{2n} + 1} \right){\kappa\pi}}{2\left( {N/2} \right)}}}} +} \right.}} \\{\left. {\sqrt{\frac{2}{N/2}}ɛ_{k}{\sum\limits_{n = 0}^{\frac{N}{2} - 1}{z_{n}\cos\quad\frac{\left( {{2n} + 1} \right){\kappa\pi}}{2\left( {N/2} \right)}}}} \right\}} \\{{= {{\sqrt{\frac{1}{2}}\left\lbrack {Y_{k} + {\left( {- 1} \right)^{k}Z_{k}}} \right\rbrack} = {{{\sqrt{\frac{1}{2}}\left\lbrack {Y_{k} + Z_{k}^{\prime}} \right\rbrack}\quad k} = 0}}},1,\ldots\quad,{\left( {N/2} \right) - 1.}} \\{{{{where}\quad Z_{k}^{\prime}\quad{is}\quad{the}\quad{DCT}\quad{of}\quad z_{n}^{\prime}} = x_{N - 1 - n}},{n = 0},1,\ldots\quad,{\left( {N/2} \right) - 1.}}\end{matrix}$ And the odd index coefficients as $\begin{matrix}{{X_{{2k} + 1} + X_{{2k} - 1}}=={\sqrt{\frac{2}{N}}\left\{ {{\sum\limits_{n = 0}^{N - 1}{x_{n\quad}\cos\quad\frac{\left( {{2n} + 1} \right)\quad\left( {{2k} + 1} \right)\pi}{2N}}} +} \right.}} \\{\left. {\sum\limits_{n = 0}^{N - 1}{x_{n}\cos\quad\frac{\left( {{2n} + 1} \right)\quad\left( {{2k} - 1} \right)\pi}{2N}}} \right\}} \\{= {\frac{1}{ɛ_{k}}\sqrt{\frac{1}{2}}\left\{ {\sqrt{\frac{2}{N/2}}ɛ_{k}{\sum\limits_{n = 0}^{\frac{N}{2} - 1}\left( {y_{n} - z_{n}^{\prime}} \right)}} \right.}} \\{{\left. {2\quad\cos\quad\frac{\left( {{2n} + 1} \right)\pi}{2N}\cos\quad\frac{\left( {{2n} + 1} \right)k\quad\pi}{2\left( {N/2} \right)}} \right\}}\quad{or}}\end{matrix}\quad$${X_{{2k} + 1} = {{\frac{1}{ɛ_{k}}\sqrt{\frac{1}{2}}\left\{ {\sqrt{\frac{2}{N/2}}ɛ_{k}{\sum\limits_{n = 0}^{\frac{N}{2} - 1}{r_{n}\cos\quad\frac{\left( {{2n} + 1} \right)k\quad\pi}{2\left( {N/2} \right)}}}} \right\}} - X_{{2k} - 1}}},{{{where}\quad k} = 0},1,\ldots\quad,{\left( {N/2} \right) - {1\quad{and}}}$$\begin{matrix}{r_{n} = {\left( {y_{n} - z_{n}^{\prime}} \right)2\quad\cos\quad\frac{\left( {{2n} + 1} \right)\pi}{2N}}} \\{= {\left\{ {\sqrt{\frac{2}{N/2}}{\sum\limits_{l = 0}^{\frac{N}{2} - 1}{{ɛ_{l}\left( {Y_{l} - Z_{l}^{\prime}} \right)}\cos\quad\frac{\left( {{2n} + 1} \right)l\quad\pi}{2\left( {N/2} \right)}}}} \right\} 2\cos\quad{\frac{\left( {{2n} + 1} \right)\pi}{2N}.}}}\end{matrix}$
 11. A method of encoding an image represented as a DCTtransformed sequence of length N, N being a positive, even integer,wherein the DCT is calculated directly from two sequences of length N/2representing the first and second half of the original sequence oflength N, characterised in that the even coefficients of a DCT of lengthN are calculated as:${X_{2k} = {{\sqrt{\frac{2}{N}}ɛ_{2k}{\sum\limits_{n = 0}^{N - 1}{x_{n}\cos\quad\frac{\left( {{2n} + 1} \right)2\kappa\quad\pi}{2N}}}} = {{\sqrt{\frac{2}{N}}ɛ_{2k}\left\{ {{\sum\limits_{n = 0}^{\frac{N}{2} - 1}{x_{n}\cos\quad\frac{\left( {{2n} + 1} \right)\kappa\quad\pi}{2\left( {N/2} \right)}}} + {\sum\limits_{n = {N/2}}^{N - 1}{x_{n}\cos\quad\frac{\left( {{2n} + 1} \right)\kappa\quad\pi}{2\left( {N/2} \right)}}}} \right\}} = {{\sqrt{\frac{2}{N}}ɛ_{k}\left\{ {{\sum\limits_{n = 0}^{\frac{N}{2} - 1}{y_{n}\cos\quad\frac{\left( {{2n} + 1} \right)\kappa\quad\pi}{2\left( {N/2} \right)}}} + {\sum\limits_{n = 0}^{\frac{N}{2} - 1}{x_{N - 1 - n}{\cos\quad\left\lbrack \frac{\left\lbrack {{2\left( {N - 1 - n} \right)} + 1} \right\rbrack{\kappa\pi}}{2\left( {N/2} \right)} \right\rbrack}}}} \right\}} = {{\sqrt{\frac{1}{2}}\left\{ {{\sqrt{\frac{2}{N/2}}ɛ_{k}{\sum\limits_{n = 0}^{\frac{N}{2} - 1}{y_{n}\cos\quad\frac{\left( {{2n} + 1} \right){\kappa\pi}}{2\left( {N/2} \right)}}}} + {\sqrt{\frac{2}{N/2}}ɛ_{k}{\sum\limits_{n = 0}^{\frac{N}{2} - 1}{z_{n}\cos\quad\frac{{\left( {{2n} + 1} \right){\kappa\pi}}\quad}{2\left( {N/2} \right)}}}}} \right\}} = {{\sqrt{\frac{1}{2}}\left\lbrack {Y_{k} + {\left( {- 1} \right)^{k}Z_{k}}} \right\rbrack} = {{{\sqrt{\frac{1}{2}}\left\lbrack {Y_{k} + Z_{k}^{\prime}} \right\rbrack}\quad k} = 0}}}}}}},1,\ldots\quad,{\left( {N/2} \right) - 1}$where  Z_(k)^(′)  is  the  DCT  of  z_(n)^(′) = x_(N − 1 − n), n = 0, 1, …  , (N/2) − 1.And the odd index coefficients as $\begin{matrix}{{X_{{2k} + 1} + X_{{2k} - 1}} = {\sqrt{\frac{2}{N}}\left\{ {{\sum\limits_{n = 0}^{N - 1}{x_{n\quad}\cos\quad\frac{\left( {{2n} + 1} \right)\quad\left( {{2k} + 1} \right)\pi}{2N}}} +} \right.}} \\{\left. {\sum\limits_{n = 0}^{N - 1}{x_{n}\cos\quad\frac{\left( {{2n} + 1} \right)\quad\left( {{2k} - 1} \right)\pi}{2N}}} \right\}} \\{= {\frac{1}{ɛ_{k}}\sqrt{\frac{1}{2}}\left\{ {\sqrt{\frac{2}{N/2}}ɛ_{k}{\sum\limits_{n = 0}^{\frac{N}{2} - 1}\left( {y_{n} - z_{n}^{\prime}} \right)}} \right.}} \\{{\left. {2\quad\cos\quad\frac{\left( {{2n} + 1} \right)\pi}{2N}\cos\quad\frac{\left( {{2n} + 1} \right)k\quad\pi}{2\left( {N/2} \right)}} \right\}}\quad{or}}\end{matrix}$${X_{{2k} + 1} = {{\frac{1}{ɛ_{k}}\sqrt{\frac{1}{2}}\left\{ {\sqrt{\frac{2}{N/2}}ɛ_{k}{\sum\limits_{n = 0}^{\frac{N}{2} - 1}{r_{n}\cos\quad\frac{\left( {{2n} + 1} \right)k\quad\pi}{2\left( {N/2} \right)}}}} \right\}} - X_{{2k} - 1}}},{{{where}\quad k} = 0},1,\ldots\quad,{\left( {N/2} \right) - {1\quad{and}}}$$\begin{matrix}{r_{n} = {\left( {y_{n} - z_{n}^{\prime}} \right)2\quad\cos\quad\frac{\left( {{2n} + 1} \right)\pi}{2N}}} \\{= {\left\{ {\sqrt{\frac{2}{N/2}}{\sum\limits_{l = 0}^{\frac{N}{2} - 1}{{ɛ_{l}\left( {Y_{l} - Z_{l}^{\prime}} \right)}\cos\quad\frac{\left( {{2n} + 1} \right)l\quad\pi}{2\left( {N/2} \right)}}}} \right\} 2\cos\quad\frac{\left( {{2n} + 1} \right)\pi}{2N}}}\end{matrix}$
 12. A method according to claim 10 characterised in that Nis equal to 2^(m), m being a positive integer>0.
 13. A method ofdecoding an image represented as a DCT transformed sequence of length N,N being a positive, even integer, wherein the DCT is calculated directlyfrom two sequences of length N/2 representing the first and second halfof the original sequence of length N, characterised in that the evencoefficients of a DCT of length N are calculated as:${X_{2k} = {{\sqrt{\frac{2}{N}}ɛ_{2k}{\sum\limits_{n = 0}^{N - 1}{x_{n}\cos\quad\frac{\left( {{2n} + 1} \right)2\kappa\quad\pi}{2N}}}} = {{\sqrt{\frac{2}{N}}ɛ_{2k}\left\{ {{\sum\limits_{n = 0}^{\frac{N}{2} - 1}{x_{n}\cos\quad\frac{\left( {{2n} + 1} \right)\kappa\quad\pi}{2\left( {N/2} \right)}}} + {\sum\limits_{n = {N/2}}^{N - 1}{x_{n}\cos\quad\frac{\left( {{2n} + 1} \right)\kappa\quad\pi}{2\left( {N/2} \right)}}}} \right\}} = {{\sqrt{\frac{2}{N}}ɛ_{k}\left\{ {{\sum\limits_{n = 0}^{\frac{N}{2} - 1}{y_{n}\cos\quad\frac{\left( {{2n} + 1} \right)\kappa\quad\pi}{2\left( {N/2} \right)}}} + {\sum\limits_{n = 0}^{\frac{N}{2} - 1}{x_{N - 1 - n}{\cos\quad\left\lbrack \frac{\left\lbrack {{2\left( {N - 1 - n} \right)} + 1 - {\kappa\pi}} \right.}{2\left( {N/2} \right)} \right\rbrack}}}} \right\}} = {{\sqrt{\frac{1}{2}}\left\{ {{\sqrt{\frac{2}{N/2}}ɛ_{k}{\sum\limits_{n = 0}^{\frac{N}{2} - 1}{y_{n}\cos\quad\frac{\left( {{2n} + 1} \right){\kappa\pi}}{2\left( {N/2} \right)}}}} + {\sqrt{\frac{2}{N/2}}ɛ_{k}{\sum\limits_{n = 0}^{\frac{N}{2} - 1}{z_{n}\cos\quad\frac{{\left( {{2n} + 1} \right){\kappa\pi}}\quad}{2\left( {N/2} \right)}}}}} \right\}} = {{\sqrt{\frac{1}{2}}\left\lbrack {Y_{k} + {\left( {- 1} \right)^{k}Z_{k}}} \right\rbrack} = {{{\sqrt{\frac{1}{2}}\left\lbrack {Y_{k} + Z_{k}^{\prime}} \right\rbrack}\quad k} = 0}}}}}}},1,\ldots\quad,{\left( {N/2} \right) - 1.}$where  Z_(k)^(′)  is  the  DCT  of  z_(n)^(′) = x_(N − 1 − n), n = 0, 1, …  , (N/2) − 1.And the odd index coefficients as $\begin{matrix}{{X_{{2k} + 1} + X_{{2k} - 1}} = {\sqrt{\frac{2}{N}}\left\{ {{\sum\limits_{n = 0}^{N - 1}{x_{n\quad}\cos\quad\frac{\left( {{2n} + 1} \right)\quad\left( {{2k} + 1} \right)\pi}{2N}}} +} \right.}} \\{\left. {\sum\limits_{n = 0}^{N - 1}{x_{n}\cos\quad\frac{\left( {{2n} + 1} \right)\quad\left( {{2k} - 1} \right)\pi}{2N}}} \right\}} \\{= {\frac{1}{ɛ_{k}}\sqrt{\frac{1}{2}}\left\{ {\sqrt{\frac{2}{N/2}}ɛ_{k}{\sum\limits_{n = 0}^{\frac{N}{2} - 1}\left( {y_{n} - z_{n}^{\prime}} \right)}} \right.}} \\{{\left. {2\quad\cos\quad\frac{\left( {{2n} + 1} \right)\pi}{2N}\cos\quad\frac{\left( {{2n} + 1} \right)k\quad\pi}{2\left( {N/2} \right)}} \right\}}\quad{or}}\end{matrix}$${X_{{2k} + 1} = {{\frac{1}{ɛ_{k}}\sqrt{\frac{1}{2}}\left\{ {\sqrt{\frac{2}{N/2}}ɛ_{k}{\sum\limits_{n = 0}^{\frac{N}{2} - 1}{r_{n}\cos\quad\frac{\left( {{2n} + 1} \right)k\quad\pi}{2\left( {N/2} \right)}}}} \right\}} - X_{{2k} - 1}}},{{{where}\quad k} = 0},1,\ldots\quad,{\left( {N/2} \right) - {1\quad{and}}}$$\begin{matrix}{r_{n} = {\left( {y_{n} - z_{n}^{\prime}} \right)2\quad\cos\quad\frac{\left( {{2n} + 1} \right)\pi}{2N}}} \\{= {\left\{ {\sqrt{\frac{2}{N/2}}{\sum\limits_{l = 0}^{\frac{N}{2} - 1}{{ɛ_{l}\left( {Y_{l} - Z_{l}^{\prime}} \right)}\cos\quad\frac{\left( {{2n} + 1} \right)l\quad\pi}{2\left( {N/2} \right)}}}} \right\} 2\cos\quad\frac{\left( {{2n} + 1} \right)\pi}{2N}}}\end{matrix}$
 14. A method of decoding an image in the compressed (DCT)domain, using DCTs of lengths N/2 and wherein the compressed frames areundersampled by a certain factor in each dimension, wherein an N×N DCTis directly calculated from 4 adjacent N/2×N/2 blocks of DCTcoefficients of the incoming compressed frames, N being a positive, eveninteger, characterised in that the even coefficients of a DCT of lengthN are calculated as:${X_{2k} = {{\sqrt{\frac{2}{N}}ɛ_{2k}{\sum\limits_{n = 0}^{N - 1}{x_{n}\cos\quad\frac{\left( {{2n} + 1} \right)2\kappa\quad\pi}{2N}}}} = {{\sqrt{\frac{2}{N}}ɛ_{2k}\left\{ {{\sum\limits_{n = 0}^{\frac{N}{2} - 1}{x_{n}\cos\quad\frac{\left( {{2n} + 1} \right)\kappa\quad\pi}{2\left( {N/2} \right)}}} + {\sum\limits_{n = {N/2}}^{N - 1}{x_{n}\cos\quad\frac{\left( {{2n} + 1} \right)\kappa\quad\pi}{2\left( {N/2} \right)}}}} \right\}} = {{\sqrt{\frac{2}{N}}ɛ_{k}\left\{ {{\sum\limits_{n = 0}^{\frac{N}{2} - 1}{y_{n}\cos\quad\frac{\left( {{2n} + 1} \right)\kappa\quad\pi}{2\left( {N/2} \right)}}} + {\sum\limits_{n = 0}^{\frac{N}{2} - 1}{x_{N - 1 - n}{\cos\quad\left\lbrack \frac{\left\lbrack {{2\left( {N - 1 - n} \right)} + 1 - {\kappa\pi}} \right.}{2\left( {N/2} \right)} \right\rbrack}}}} \right\}} = {{\sqrt{\frac{1}{2}}\left\{ {{\sqrt{\frac{2}{N/2}}ɛ_{k}{\sum\limits_{n = 0}^{\frac{N}{2} - 1}{y_{n}\cos\quad\frac{\left( {{2n} + 1} \right){\kappa\pi}}{2\left( {N/2} \right)}}}} + {\sqrt{\frac{2}{N/2}}ɛ_{k}{\sum\limits_{n = 0}^{\frac{N}{2} - 1}{z_{n}\cos\quad\frac{{\left( {{2n} + 1} \right){\kappa\pi}}\quad}{2\left( {N/2} \right)}}}}} \right\}} = {{\sqrt{\frac{1}{2}}\left\lbrack {Y_{k} + {\left( {- 1} \right)^{k}Z_{k}}} \right\rbrack} = {{{\sqrt{\frac{1}{2}}\left\lbrack {Y_{k} + Z_{k}^{\prime}} \right\rbrack}\quad k} = 0}}}}}}},1,\ldots\quad,{\left( {N/2} \right) - 1.}$where  Z_(k)^(′)  is  the  DCT  of  z_(n)^(′) = x_(N − 1 − n), n = 0, 1, …  , (N/2) − 1.And the odd index coefficients as $\begin{matrix}{{X_{{2k} + 1} + X_{{2k} - 1}} = {\sqrt{\frac{2}{N}}\left\{ {{\sum\limits_{n = 0}^{N - 1}{x_{n\quad}\cos\quad\frac{\left( {{2n} + 1} \right)\quad\left( {{2k} + 1} \right)\pi}{2N}}} +} \right.}} \\{\left. {\sum\limits_{n = 0}^{N - 1}{x_{n}\cos\quad\frac{\left( {{2n} + 1} \right)\quad\left( {{2k} - 1} \right)\pi}{2N}}} \right\}} \\{= {\frac{1}{ɛ_{k}}\sqrt{\frac{1}{2}}\left\{ {\sqrt{\frac{2}{N/2}}ɛ_{k}{\sum\limits_{n = 0}^{\frac{N}{2} - 1}\left( {y_{n} - z_{n}^{\prime}} \right)}} \right.}} \\{{\left. {2\quad\cos\quad\frac{\left( {{2n} + 1} \right)\pi}{2N}\cos\quad\frac{\left( {{2n} + 1} \right)k\quad\pi}{2\left( {N/2} \right)}} \right\}}\quad{or}}\end{matrix}$${X_{{2k} + 1} = {{\frac{1}{ɛ_{k}}\sqrt{\frac{1}{2}}\left\{ {\sqrt{\frac{2}{N/2}}ɛ_{k}{\sum\limits_{n = 0}^{\frac{N}{2} - 1}{r_{n}\cos\quad\frac{\left( {{2n} + 1} \right)k\quad\pi}{2\left( {N/2} \right)}}}} \right\}} - X_{{2k} - 1}}},{{{where}\quad k} = 0},1,\ldots\quad,{\left( {N/2} \right) - {1\quad{and}}}$$\begin{matrix}{r_{n} = {\left( {y_{n} - z_{n}^{\prime}} \right)2\quad\cos\quad\frac{\left( {{2n} + 1} \right)\pi}{2N}}} \\{= {\left\{ {\sqrt{\frac{2}{N/2}}{\sum\limits_{l = 0}^{\frac{N}{2} - 1}{{ɛ_{l}\left( {Y_{l} - Z_{l}^{\prime}} \right)}\cos\quad\frac{\left( {{2n} + 1} \right)l\quad\pi}{2\left( {N/2} \right)}}}} \right\} 2\cos\quad\frac{\left( {{2n} + 1} \right)\pi}{2N}}}\end{matrix}$
 15. A method according to claim 13, characterised in thatN is equal to 2^(m), m being a positive integer>0.
 16. An encoderaccording to claim 2, characterised in that N is equal to 2^(m), m beinga positive integer>0.
 17. A decoder according to claim 5, characterisedin that N is equal to 2^(m), m being a positive integer>0.
 18. Atranscoder comprising an encoder or decoder according to claim
 2. 19. Atranscoder comprising an encoder or decoder according to claim
 4. 20. Atranscoder comprising an encoder or decoder according to claim
 5. 21. Asystem for transmitting DCT transformed image or video data comprisingan encoder or decoder according to claim
 2. 22. A system fortransmitting DCT transformed image or video data comprising an encoderor decoder according to claim
 4. 23. A system for transmitting DCTtransformed image or video data comprising an encoder or decoderaccording to claim
 5. 24. A method according to claim 11, characterisedin the N is equal to 2^(m), m being a positive integer>0.
 25. A methodaccording to claim 14, characterised in the N is equal to 2^(m), m beinga positive integer>0.
 26. A transcoder according to claim 7, wherein thetranscoder is arranged to downscale a compressed image.
 27. A transcoderaccording to claim 18, wherein the transcoder is arranged to downscale acompressed image.
 28. A transcoder according to claim 19, wherein thetranscoder is arranged to downscale a compressed image.
 29. A transcoderaccording to claim 20, wherein the transcoder is arranged to downscale acompressed image.
 30. A transcoder according to claim 21, wherein thetranscoder is arranged to downscale a compressed image.